﻿using TweetSayingsLibrary.App.DataDoc;
using Dimebrain.TweetSharp.Fluent;

namespace TweetSayingsLibrary.App.Entity
{
    public class Search
    {
        public static IDataDoc Containing(string text, int page, int take)
        {
            return Current.SessionTrack.ApiCaller.Request(t => t.Search().Query().Containing(text).Skip(page).Take(take), true); 
        }

        public static IDataDoc Near(double latitude, double longitude, double miles, int page, int take)
        {
            return Current.SessionTrack.ApiCaller.Request(t => t.Search().Query().Of(latitude, longitude).Within(miles).Skip(page).Take(take), true);
        }
    }
}